package com.wudd;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.context.annotation.Bean;

import com.wudd.entity.Do.User;

@EnableFeignClients
@SpringBootApplication
//@EnableEurekaClient
public class ConsumerApplication extends SpringBootServletInitializer {
	
    public static void main( String[] args ){
    	new SpringApplicationBuilder(ConsumerApplication.class).web(true).run(args);
    }
    
    @Bean(initMethod = "initMethod",destroyMethod = "destroyMethod")    
    public User user(){        
    	return new User();
    }
    
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(ConsumerApplication.class);
    }
    
}
